<?php 

function smarty_function_dump ($params, $tpl) { 	
    $hide = false;
	$html = false;
    $res = "";
    		
	if (isset($params['var'])) {
		$res .= "Template variable '".$params['var']."':\n".var_export($tpl->_tpl_vars[$params['var']], true)."\n";	
	}
	if (isset($params['value'])) {
		$res .= var_export($params['value'] ,true);
	}
	if (isset($params['hide'])) $hide = $params['hide'];
	

	
	if($hide) 
		return "<!--\n".$res."\n-->";
	else 
		return "<pre>".$res."</pre>";
	
	return $res;
}

?>